import django_filters
from apps.UserControl.models.permission import Permissions


class PermissionFilters(django_filters.rest_framework.FilterSet):
    name = django_filters.CharFilter(field_name='name', lookup_expr='icontains')
    method = django_filters.CharFilter(field_name='method', lookup_expr='icontains')

    class Meta:
        model = Permissions
        fields = ['name', 'method']
